/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.hiof.moraa.server.controller.restfulservice;

import com.hiof.moraa.server.service.RouteService;
import com.hiof.moraa.server.service.model.RouteInfoCollection;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 *
 * @author Bergy
 */
@Controller
@RequestMapping("/restfulservice/")
public class RouteInformationController {

    @Autowired
    RouteService routeService;

    @RequestMapping(value = "/routeInfo", method = RequestMethod.POST)
    @ResponseBody
    public RouteInfoCollection getRouteInfo(
            @RequestParam("username") String username) throws Exception {
        return routeService.getRouteInfoCollection(username);
    }  
}
